<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:output method="html"/>

  <!-- the main template -->
  <xsl:template match="/">
    <HTML>
      <HEAD>
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <xsl:if test="'{7}'!=''">
          <TITLE>{7}</TITLE>
        </xsl:if>
      </HEAD>
      <STYLE>
        body
        {{
        font-family: {0};
        color: {2};
        }}

        .value {{
        font-size: {1}pt;
        }}

        .header
        {{
        font-size: {8}pt;
        font-weight: bold;
        text-align: left;
        padding: 2 2 2 2;
        background-color: #e3e3e3;
        }}

        .shading
        {{
        background-color: #F4F4F4;
        }}

        .title
        {{
        font-size : 16pt;
        font-weight: bold;
        text-align: center;
        }}
      </STYLE>
      <BODY>
        <xsl:if test="'{7}'!=''">
          <center>
            <span class="title">{7}</span>
          </center>
        </xsl:if>
        <table>
          <xsl:if test="'true'='{6}'">
            <TH class="header"/>
          </xsl:if>
          {3}
          <xsl:apply-templates/>
        </table>
      </BODY>
    </HTML>
  </xsl:template>

  <xsl:template match="movieInfo">

    <tr>
      <xsl:if test="'true'='{5}'">
        <xsl:if test="position() mod 2 = 0">
          <xsl:attribute name="class">shading</xsl:attribute>
        </xsl:if>
      </xsl:if>
      <xsl:if test="'true'='{6}'">
        <td>
          <xsl:if test="picture!=''">
            <img src="{{picture}}" border="0" width="50"/>
          </xsl:if>
        </td>
      </xsl:if>

      {4}
    </tr>

  </xsl:template>
</xsl:stylesheet>

